<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<script type="text/javascript">
    $(function() {
        $('#appBaseAddForm').form({
            url : '${path }/appBase/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为appBase.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                }
            }
        });

    });
</script>
<div style="padding: 3px;">
    <form id="appBaseAddForm" method="post">
        <table class="grid">
            <tr>
                <td>数据类型</td>
                <td><input name="type" type="text" placeholder="请输入数据类型" class="easyui-validatebox" data-options="required:true"  ></td>
                <td>是否可以删除</td>
                <td>
                    <select name="delFlag" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
                        <option value="0">不可以</option>
                        <option value="1">可以</option>
            </select>
            </td>
            </tr>
            <tr>
                <td>数据key</td>
                <td><input name="key" type="text" placeholder="请输入数据key" class="easyui-validatebox" data-options="required:true"  value=""></td>
                <td>数据值</td>
                <td><input name="value" type="text" placeholder="请输入数据值" class="easyui-validatebox" data-options="required:true"  value=""></td>
            </tr>
            <tr>
                <td>百分比</td>
                <td><input name="percentage" type="text" placeholder="请输入百分比" class="easyui-validatebox" data-options="required:true" value=""></td>
            </tr>
        </table>
    </form>
</div>